package com.sanrenzu.chunbo.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by My on 2016/9/1.
 */
public class XiangQingFramentAdapter extends FragmentPagerAdapter {
    private List<Fragment> list;
    private String[] arraytabs;

    public XiangQingFramentAdapter(FragmentManager fm, List<Fragment> list, String[] arraytabs) {
        super(fm);
        this.list=list;
        this.arraytabs=arraytabs;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return arraytabs[position];
    }
}
